public class SX1 {
    String str = new String("some");

    public static void main(String[] args) {
        SX1 sx1 = new SX1();
        sx1.change(sx1.str);
        System.out.println(sx1.str);
    }

    private void change(String str) {
        str = "foo";
    }
}
